// let [a, b, c] = [1, 2, 3];
// console.log(a); // 1
// console.log(b); // 2
// console.log(c); // 3

// let [a, b, c, d] = [1, 2, 3];
// console.log(a); // 1
// console.log(b); // 2
// console.log(c); // 3
// console.log(d); // undefined

let [a, b] = [1, 2, 3];
console.log(a); // 1
console.log(b); // 2

let username = 'tom';
let person = {
    username : '张三',
    age : 23
}
// 通过取别名的方式避免结构赋值所用重名
let {username : myUsername, age} = person;
console.log(username);
console.log(myUsername);
console.log(age);